import request from '@/utils/request'

export function getPostPage(params) {
    return request({
        url: `/api/v1/core/post/page`,
        method: 'post',
        data: params
    })
}

export function addPost(params) {
    return request({
        url: `/api/v1/core/post/add`,
        method: 'post',
        data: params
    })
}

export function updatePost(params) {
    return request({
        url: `/api/v1/core/post/update`,
        method: 'post',
        data: params
    })
}

export function deletePost(params) {
    return request({
        url: `/api/v1/core/post/delete?id=${params.id}`,
        method: 'get'
    })
}

export function getPostListByOrgId(params) {
    return request({
        url: `/api/v1/core/post/listByOrgId?orgId=${params.orgId}`,
        method: 'get'
    })
}
